home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / DVIM72-M / OUTROW.C < prev    next >
Text File  |  1990-03-25  |  1KB  |  34 lines

  1. /* -*-C-*- outrow.h */
  2. /*-->outrow*/
  3. /**********************************************************************/
  4. /******************************* outrow *******************************/
  5. /**********************************************************************/
  6. #include "dvihead.h"
  7. #include "commands.h"
  8. #include "gendefs.h"
  9. #include "gblprocs.h"
  10. #include "m72.h"
  11. #include "egblvars.h"
  12.  
  13. void
  14. outrow(c,yoff)    /* copy img_row[] into rasters[] if allocated, else no-op */
  15. BYTE c;        /* current character value */
  16. UNSIGN16 yoff;    /* offset from top row (0,1,...,hp-1) */
  17. {
  18.     register UNSIGN16 k;    /* loop index */
  19.     register UNSIGN32 *p;    /* pointer into img_row[] */
  20.     register UNSIGN32 *q;    /* pointer into rasters[] */
  21.     register struct char_entry *tcharptr; /* temporary char_entry pointer */
  22.     UNSIGN16 words_per_row;    /* number of raster words to copy */
  23.  
  24.     tcharptr = &(fontptr->ch[c]);
  25.     if (tcharptr->rasters != (UNSIGN32*)NULL)
  26.     {
  27.     words_per_row = (UNSIGN16)(tcharptr->wp + 31) >> 5;
  28.     p = tcharptr->rasters + yoff*words_per_row;
  29.     q = img_row;
  30.     for (k = words_per_row; k; --k)    /* copy img_row[] into rasters[] */
  31.         *p++ = *q++;
  32.     }
  33. }
  34.